namespace :bilibiliranking do
  desc "bilibili ranking example ed"
  task :ed => :environment do
    doc = BiliRankingMaker.create({:path => "#{BILI_PRO_PATH}#{ENV['pa']}\\"}) do |vvm|
      vvm.ed_bgm do |length|
        vvm.ut[:pic_list] = VegasVideoTime.nl length - 21 if length > 21 #这句计算出每张排名图片停留的时间
        vvm.title(5, false, 5).list2.ed
      end
    end
    doc.write File.open("#{BILI_PRO_PATH}#{ENV['pa']}\\" + "xml.xml", 'w')
  end
end